<?php
$loader->requireOnce('includes/EnumerationConstant.class.php');
/**
 * Object Relational Persistence Mapping Class for table: tracking_system
 *
 * @package	com.athena
 * @author	LHV
 */
class TrackingSystem extends ORDataObject {

	/**#@+
	 * Fields of table: tracking_system mapped to class members
	 */
	var $tracking_system_id		= '';
	var $date		= '';
	var $user_id		= '';
	var $table_name		= '';
	var $reason		= '';
	var $before_change		= '';
	var $after_change		= '';
	var $item_id      = '';
	/**#@-*/


	/**
	 * DB Table
	 */
	var $_table = 'tracking_system';

	/**
	 * Primary Key
	 */
	var $_key = 'tracking_system_id';
	var $enum_type = '';
	var $changed_table_name = '';
	
	/**
	 * Internal Name
	 */
	var $_internalName = 'TrackingSystem';

	/**
	 * Handle instantiation
	 */
	function __construct() {
		parent::ORDataObject();
	}
	
	public function setData($userId, $type, $tableName, $itemId, $beforeChange, $afterChange, $reason) {
		$data = array('user_id'=>$userId,
		'before_change'=>$beforeChange,
		'enum_type'=>$type,
		'item_id'=>$itemId,
		'changed_table_name'=>$tableName,
		'after_change'=>$afterChange,
		'reason'=>$reason,
		'date'=>date('Y-m-d H:i:s'));
		$this->populateArray($data);
	}

	

}
?>
